package com.example.travel.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.example.travel.domain.entity.AliPay;
import com.example.travel.domain.entity.Orders;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * @Author : LinQingLiang
 * @file : OrdersMapper.java
 * @Since : 2023/2/22 19:28
 */

@Mapper
public interface OrdersMapper extends BaseMapper<Orders> {

    int updateState(@Param("no") String tradeNo, @Param("state") String state,@Param("paymentTime") String gmtPayment,
                     @Param("alipayNo") String alipayTradeNo);

    Page<Orders> page(Page<Object> objectPage,@Param("name") String name,@Param("role") String role, @Param("id") Integer id);

    int updatePayState(@Param("no") String traceNo,@Param("state") String state,@Param("time") String time);

    Orders selectByTranceNo(@Param("tranceNo") String traceNo);

    int selectTotalPrice(String state);

    int selectOrderCount(String state);
}

